home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / bash / bash_1135 / bash1135.zoo / bash-1.13.5 / lib / tilde / Makefile-ST
Encoding:
Makefile  |  1994-03-16  |  3.0 KB  |  104 lines

  1. ## -*-text-*- ######################################################
  2. #                                   #
  3. # Makefile for the GNU Tilde Library.                   #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # This Makefile is hand made from a template file, found in
  8. # ../template.  Each library must provide several Makefile
  9. # targets: `all', `clean', `documentation', `install', and
  10. # `what-tar'.  The `what-tar' target reports the names of the
  11. # files that need to be included in a tarfile to build the full
  12. # code and documentation for this library.
  13.  
  14. # Please note that the values for INCLUDES, CC, AR, RM, CP,
  15. # RANLIB, and selfdir are passed in from ../Makefile, and do
  16. # not need to be defined here.
  17. # Got this from make -f bash-Makefile:
  18. CFLAGS= -DHAVE_ALLOCA -DHAVE_UID_T -DHAVE_BCOPY -D_BSD_SOURCE \
  19.     -DHAVE_DIRENT -DHAVE_DIRENT_H -DHAVE_STRING_H -DHAVE_VARARGS_H \
  20.     -DHAVE_STRCHR -Datarist -DMiNT -DHAVE_UNISTD_H -DHAVE_LIMITS_H \
  21.     -DHAVE_STDLIB_H -DSHELL -I../.. -I../ \
  22.     -mpcrel -mbaserel -O2 -fomit-frame-pointer
  23. CPPFLAGS=-I. -I./lib/
  24. LDFLAGS=
  25. RANLIB=ar s
  26. AR=ar
  27. CC=gcc
  28. RM=rm -f
  29. # END OF PARAMETERS
  30. # Here is a rule for making .o files from .c files that doesn't force
  31. # the type of the machine (like -sun3) into the flags.
  32. .c.o:
  33.     $(CC) -c $(CFLAGS) $(INCLUDES) $(LOCAL_DEFINES) $(CPPFLAGS) $*.c
  34.  
  35. # LOCAL_DEFINES are flags that are specific to this library.
  36. # Define -DUSG if you are using a System V operating system.
  37. LOCAL_DEFINES = $(LOCAL_INCLUDES) #-DUSG
  38.  
  39. # For libraries which include headers from other libraries.
  40. LOCAL_INCLUDES = -I../
  41.  
  42. # The name of the library target.
  43. LIBRARY_NAME = tilde.olb
  44.  
  45. # The C code source files for this library.
  46. CSOURCES = tilde.c
  47.  
  48. # The header files for this library.
  49. HSOURCES = tilde.h
  50.  
  51. OBJECTS = tilde.o
  52.  
  53. # The texinfo files which document this library.
  54. DOCSOURCE = doc/tilde.texi
  55. DOCOBJECT = doc/tilde.dvi
  56. DOCSUPPORT = doc/Makefile
  57. DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
  58.  
  59. SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
  60.  
  61. SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
  62.  
  63. THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
  64.  
  65. ######################################################################
  66.  
  67. all: $(LIBRARY_NAME)
  68.  
  69. $(LIBRARY_NAME): $(OBJECTS)
  70.     $(RM) -f $@
  71.     $(AR) cq $@ $(OBJECTS)
  72.     $(RANLIB) $@
  73.  
  74. what-tar:
  75.     @for file in $(THINGS_TO_TAR); do \
  76.       echo $(selfdir)$$file; \
  77.     done
  78.  
  79. documentation: force
  80.     (cd doc; make)
  81. force:
  82.  
  83. # The rule for 'includes' is written funny so that the if statement
  84. # always returns TRUE unless there really was an error installing the
  85. # include files.
  86. install:
  87.     -$(MV) $(bindir)/$(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)-old
  88.     $(CP) $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
  89.     if [ -f "$(RANLIB)" ]; then $(RANLIB) -t $(bindir)/$(LIBRARY_NAME); fi
  90.  
  91. clean:
  92.     $(RM) -f $(OBJECTS) $(LIBRARY_NAME)
  93.     (cd doc; make clean)
  94.  
  95.  
  96. ######################################################################
  97. #                                     #
  98. #  Dependencies for the object files which make up this library.     #
  99. #                                     #
  100. ######################################################################
  101.  
  102. tilde.o: tilde.h tilde.c
  103.